﻿// Write a method GetMax() with two parameters that returns the bigger of two integers. 
// Write a program that reads 3 integers from the console and prints the biggest of them using the method GetMax().

using System;

public class GetMaxNum
{
    static void Main()
    {
        int numbersCount = 3;
        int biggestNumber = int.MinValue;
        for (int i = 1; i <= numbersCount; i++)
        {
            Console.Write("Enter number {0}: ", i);
            int number = int.Parse(Console.ReadLine());
            biggestNumber = GetMax(biggestNumber, number);
        }

        Console.WriteLine("The biggest number is: {0}", biggestNumber);
    }

    public static int GetMax(int num1, int num2)
    {
        int biggerNum = num1;
        if (num2 > num1)
        {
            biggerNum = num2;
        }

        return biggerNum;
    }
}